Fix miscellaneous update-game-score bugs.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 22 Jan 2014 19:02:41 +0000 (11:02 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 22 Jan 2014 19:02:41 +0000 (11:02 -0800)
commit2eed26d72e3b466d7845ece3137c24f9aeea1596
treefecce7c97b06b0e6ae29b7583ba431051792a0a1
parente6084e4e5e2c4b6ed361b3944681d6c2a779c0c4
Fix miscellaneous update-game-score bugs.

* configure.ac (difftime): Remove.
* lib/update-game-score.c (difftime) [!HAVE_DIFFTIME]: Remove.
(read_score) [HAVE_GETDELIM]: Don't access uninitialized storage.
(read_scores, write_scores): Check for fclose failure.
(write_scores): Use fchmod, not chmod, to avoid a race.
(lock_file): Fix test for out-of-date lock file; it was reversed.
Use ordinary subtraction rather than difftime; since we're already
assuming POSIX we don't need to worry about the possibility of
time_t being a magic cookie.
ChangeLog
configure.ac
lib-src/ChangeLog
lib-src/update-game-score.c